
// import {useState} from 'react';

import useState from "./testState";

const UseTestState = ()=>{

    const [num,setNum] = useState(0);

    const handleClick = ()=>{
        setNum(num+1,(newState)=>{
            console.log(newState)
        });
    }
    return(
        <div>
            {num}
            <hr/>
            <button onClick={handleClick}>点我</button>
        </div>
    )
}

export default UseTestState;